DI
suporte scripts

(resolvido) Remover mensagem de exhaust da spell

Por diarmaint, 25 de jan. de 2017 em Resolvidos

otserv
6
1.7k
diarmaintD
25 de janeiro de 2017 às 16:54

Então galera, quando eu uso essa spells e fico apertando sem parar o Default fica lotado como a seguinte mensagem em laranja " Aguarde "xx " segundos para usar a spell novamente.."

 

 


local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 39)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -0.2, 0, -0.2, 0)

local function onCastSpell1(parameters)
    doCombat(parameters.cid, parameters.combat1, parameters.var)
end


function onCastSpell(cid, var)
local waittime = 3 -- Tempo de exhaustion
local storage = 115819
if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
return false
end
local parameters = { cid = cid, var = var, combat1 = combat1 }
if isCreature(cid) then
addEvent(onCastSpell1, 0, parameters)  
end
end
exhaustion.set(cid, storage, waittime)
return true
end

 

Tem como fazer ela parar de aparecer no default e aparecer aqui ? (You cannot use....)

h1lYc6J.png

Editado Janeiro 25 por diarmaint

DeadpoolD
25 de janeiro de 2017 às 17:03

você quer remover so a mensagem? ou o exaust?

diarmaintD
25 de janeiro de 2017 às 17:08

queria "retirar" ela do default e colocar aonde ta essa mensagem branca.

h1lYc6J.png

daí o player conseguiria ver que ta faltando x tempo e que o default n fiquei poluído.

Ex. Seguro tao botão pra spell, e alguem fala perto de min, não consigor ler a mensagem no default pq ele fica todo tampado de

Aguarde "5 " segundos para usar a spell novamente.

Aguarde "5 " segundos para usar a spell novamente.

Aguarde "5 " segundos para usar a spell novamente.

Aguarde "4 " segundos para usar a spell novamente.

Aguarde "4 " segundos para usar a spell novamente.

Aguarde "4 " segundos para usar a spell novamente.

Aguarde "3 " segundos para usar a spell novamente.

Aguarde "3 " segundos para usar a spell novamente.

Aguarde "3 " segundos para usar a spell novamente.

 

 

 

Editado Janeiro 25 por diarmaint

DeadpoolD
25 de janeiro de 2017 às 17:13
Melhor resposta

Usa este: 

Spoiler
local combat1 = createCombatObject()setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 39)setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -0.2, 0, -0.2, 0)local function onCastSpell1(parameters)    doCombat(parameters.cid, parameters.combat1, parameters.var)endfunction onCastSpell(cid, var)local waittime = 3 -- Tempo de exhaustionlocal storage = 115819if exhaustion.check(cid, storage) thendoPlayerSendTextMessage(cid, 22, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")return falseendlocal parameters = { cid = cid, var = var, combat1 = combat1 }if isCreature(cid) thenaddEvent(onCastSpell1, 0, parameters)  endendexhaustion.set(cid, storage, waittime)return trueend 

 

Caso não esteja como queira, é só você ir alterando os numeros deste linha:

doPlayerSendTextMessage(cid, 22, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")

o numero 22.

coloca algum destes numeros:

Spoiler
MESSAGE_FIRST = 18MESSAGE_STATUS_CONSOLE_RED = MESSAGE_FIRSTMESSAGE_EVENT_ORANGE = 19MESSAGE_STATUS_CONSOLE_ORANGE = 20MESSAGE_STATUS_WARNING = 21MESSAGE_EVENT_ADVANCE = 22MESSAGE_EVENT_DEFAULT = 23MESSAGE_STATUS_DEFAULT = 24MESSAGE_INFO_DESCR = 25MESSAGE_STATUS_SMALL = 26MESSAGE_STATUS_CONSOLE_BLUE = 27MESSAGE_LAST = MESSAGE_STATUS_CONSOLE_BLUE

 

 

diarmaintD
25 de janeiro de 2017 às 17:32

Assim que testar te dou um feeback!!

Como eu pedi, deu certo com o 23, Muito obrigado!

 

 

Editado Janeiro 25 por diarmaint

DeadpoolD
25 de janeiro de 2017 às 20:56

Caro membro, seu tópico foi movido de Otserv > Suporte Otserv para Suporte Otserv > Otserv > Pedidos e Dúvidas Resolvidos.